#include "Entity.h"

Entity::Entity(Graphics &graphics):
	m_scale(1,1,1),
	m_position(0,0,0),
	m_rotation(0,0,0),
	m_graphics(graphics)
{
   m_material = new Material(m_graphics);
}
//---------------------------------------------------------------------------------------------//
void Entity::Translate(Vector3 position)
{
	
}
//---------------------------------------------------------------------------------------------//
//---------------------------------------------------------------------------------------------//
//---------------------------------------------------------------------------------------------//
bool Entity::Draw(USHORT vertexCount, D3DMeshVertex* vertices,
				  USHORT indexCount, USHORT* indices,
				  USHORT primCount, PRIM_TYPE primType)
{
	m_graphics.SetTexture(NULL);
	m_graphics.SetMatrixMode(WORLD_MATRIX);
	m_graphics.LoadIdentity();

	m_graphics.Translate(m_position);
	m_graphics.Scale(m_scale);
	m_graphics.Rotate(m_rotation);

   m_material->SetMaterial();

	return(m_graphics.DrawElements(vertexCount, vertices, indexCount, indices, primCount, primType));
}